function useAddKey(list: any, key: string) {
    if (key === "flag") {
        list.map((item: any) => item[key] = false)
    } else {
        list.map((item: any) => item.key = item[key])
    }

    return list
}

export {
    useAddKey
}